﻿<div class="widget widget-table">
    <div class="widget-header">
        <h3><i class="fa fa-table"></i> 地址查询 </h3>
    </div>
    <div class="widget-content">
        <div class="row">
            <div class="col-sm-12 search-bar">
                <div class="search-col">
                    <label class="search-label">搜索条目：</label>
                    <select class="form-control search-control" ng-model="searchBar.keywordType">
                        <option value="customerNumber">客户编号</option>
                        <option value="trackingNumber">包裹跟踪号</option>                        
                        <option value="userName">账号</option>
                        <!--<option value="name">姓名</option>-->
                        <option value="emailAddress">邮箱</option>
                    </select>
                    <input type="text" class="form-control search-control" style="margin-left:5px; width:480px;" placeholder="请输入查询关键字" ng-model="searchBar.keywords" />
                    <button type="button" class="btn btn-primary" style="margin-left:5px;" ng-click="btnSearch()">搜索</button>
                </div>
            </div>
        </div>
        <table class="table table-bordered">
            <thead>
                <tr>
                    <th>序号</th>
                    <th>客户编号</th>
                    <th>收货人姓名</th>
                    <th>手机号码</th>
                    <th>收货地址</th>
                    <th>验证状态</th>
                    <th>操作</th>
                </tr>
            </thead>
            <tbody>
                <tr ng-if="dataList.length == 0">
                    <td colspan="13">没有数据，请选择条件进行搜索。</td>
                </tr>
                <tr ng-if="dataList.length > 0" ng-repeat="item in dataList">
                    <td>{{item.rownumber}}</td>
                    <td><a href="javascript:void(0);" ng-click="btnOpenDetail('customer',item)">{{item.customerNumber}}</a></td>
                    <td><a href="javascript:void(0);" ng-click="btnOpenDetail('address',item)">{{item.receivePersonName}}</a></td>
                    <td>{{item.cellphoneNumber}}</td>
                    <td>
                        <span>{{item.receivePersonName}}</span>
                        <span ng-show="!!item.cellphoneNumber">({{item.cellphoneNumber}})</span>
                        <span>{{item.address1}}</span>
                        <span ng-show="!!item.receiveCompanyName">{{item.receiveCompanyName}}</span>
                        <span ng-show="!!item.zipcode">({{item.zipcode}})</span>
                    </td>
                    <td ng-class="{'alert-danger': item.verifyMark == 0}">{{item._verifyMark}}</td>
                    <td>
                        <a href="javascript:void(0);" class="role" data-role="29" ng-click="btnVerification(item, $index)">{{item.verifyMark == 0 ? '验证' : "取消验证"}}</a>
                        <a href="javascript:void(0);" class="role" data-role="30" ng-click="btnDelete(item)">删除</a>
                    </td>
                </tr>
            </tbody>
        </table>
        <div class="row">
            <div class="col-sm-12 text-right">
                <uib-pagination class="pagination pagination-rewrite pull-right"
                                boundary-links="true"
                                max-size="5"
                                total-items="pagination.totalCount"
                                items-per-page="pagination.pageSize"
                                ng-model="pagination.pageIndex"
                                ng-change="getData()"
                                previous-text="上一页"
                                next-text="下一页"
                                first-text="首页"
                                last-text="尾页">
                </uib-pagination>
                <select class="form-control pull-right" style="width:70px;" ng-model="pagination.pageSize" ng-change="getData()">
                    <option value="10">10</option>
                    <option value="20">20</option>
                    <option value="50">50</option>
                    <option value="100">100</option>
                </select>
            </div>
        </div>
    </div>
</div>